#ifndef _H264_DEC_H_
#define _H264_DEC_H_

#define AVCD_ERROR                       -1
#define AVCD_OK                          0
#define AVCD_OK_STREAM_NOT_DECODED       1
#define AVCD_OK_FRAME_NOT_AVAILABLE      2


#define AVCD_DECODE_FLAG_REMOVE03 0x01
#define AVCD_DECODE_FLAG_CAN_MODIFY_SRC_NAL 0x02


typedef void avcdDecoder_t;

typedef enum _AVCD_PIC_TYPE_CONST
{
	AVCD_PIC_NONE,
	AVCD_PIC_SPS,
	AVCD_PIC_PPS,
	AVCD_PIC_IDR,
	AVCD_PIC_I,
	AVCD_PIC_P,
	AVCD_PIC_B,

}AVCD_PIC_TYPE_CONST;

typedef struct _dec_info_s 
{

	int            width;              
	int            height;         
	int            pic_type;   
	int            linesize;
	unsigned char *y;
	unsigned char *u;
	unsigned char *v;
}
dec_info_s;

#ifdef __cplusplus
extern "C" {
#endif

	int  __stdcall DecodeVideoStream(void *handle,unsigned char *strbuf,int bufsize,dec_info_s *dec);

	long __stdcall OpenVideoDecoder();
	void __stdcall CloseVideoDecoder(void *handle);

#ifdef __cplusplus
};
#endif

#endif